{% for item in redis_conf | sort %}
{{ item[0] }} {{ item[1] }}
{% endfor %}

{% if (sentinel_redis_master is defined) and (sentinel_redis_master != bind_address) %}
slaveof {{ sentinel_redis_master }} 6379
{% elif inventory_hostname != groups['redis'][0] %}
slaveof {{ groups['redis'][0] + '.node.' + consul_dc_name + '.consul' }} 6379
{% endif %}

maxmemory {{ (ansible_memtotal_mb * 1024 * 1024 * redis_extra_conf.maxmemory_percent) | int }}

bind {{ bind_address }} 127.0.0.1
